package com.spark_core

import org.apache.spark.rdd.RDD
import org.apache.spark.sql.SparkSession

object InterfaceCount {
  def main(args: Array[String]): Unit = {
    val spark: SparkSession = SparkSession
      .builder()
      .master("local[8]")
      .appName("interface")
      .getOrCreate()

    val value: RDD[String] = spark.sparkContext.textFile("data/接口调用次数.txt")


    val mapRdd: RDD[(String, String, String)] = value.map(
      line => {
        val strings: Array[String] = line.split("\t")
        (strings(0), strings(1), strings(2))
      }
    )

    spark.sparkContext.textFile("")

    mapRdd.foreach(print)

  }

}
